{% extends "myadmin/base.html" %}


{% block mainbody %}
 <div class="row">
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">管理账户列表</h3>


            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
              <table class="table table-hover">
                <tr>
                  <th>ID号</th>
                  <th>账号</th>
                  <th>类别</th>
                  <th>注册时间</th>
                  <th>操作</th>
                </tr>
                {% for vo in userslist%}
                <tr>
                  <td>{{vo.id}}</td>
                  <td>{{vo.username}}</td>
                  <td>{% if vo.state == 0 %}管理员{% else %}普通用户{% endif %}</td>
                  <td>{{vo.addtime}}</td>
                  <td><a href="{% url 'myadmin_vip_edit' vo.id %}" type="button" class="btn btn-success btn-xs">编辑</a> <a href="{% url 'myadmin_vip_del' vo.id %}" type="button" class="btn btn-danger btn-xs">删除</a></td>

                </tr>
                {% endfor%}
              </table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
      </div>
      
<div class="col-sm-7">
  <div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
    <ul class="pagination">
      <li {% if pIndex == 1 %} class="paginate_button previous disabled" {% else %}class="paginate_button previous"
      {% endif %} id="example2_previous"><a href="{% url 'myadmin_vip_index' pIndex|add:-1 %}" aria-controls="example2" data-dt-idx="0" tabindex="0">Previous</a></li>
      {% for p in plist %}
      <li {% if pIndex == p %}class="paginate_button active"{% else %}class="paginate_button"
      {% endif %}><a href="{% url 'myadmin_vip_index' p %}" aria-controls="example2" data-dt-idx="{{p}}" tabindex="0">{{p}}</a></li>
      {% endfor %}

      <li {% if pIndex == maxpages %} class="paginate_button next disabled" {% else %}class="paginate_button next"
      {% endif %} id="example2_next"><a href="{% url 'myadmin_vip_index' pIndex|add:1 %}" aria-controls="example2" data-dt-idx="{{maxpages|add:1}}" tabindex="0">Next</a></li>
    </ul>
  </div>
{% endblock %}